function checkname(){
	var name=document.getElementById("name").value;
	var namehint=document.getElementById("namehint");
	if(name==""){
		namehint.innerText="姓名不能为空";
		return false;
	}else{
		return true;
	}
}
function checkphone(){
	var regphone="^[1][3-9][0-9]{9}$";
	var phone=document.getElementById("phone");
	var phonehint=document.getElementById("phonehint")
	if(phone.value==""){
		phonehint.innerText="手机号不能为空"
		return false
	}else if(!phone.value.match(regphone)){
		phonehint.innerText="请填写正确的手机号"
		
		return false
	}else{
		phonehint.innText="√"
		return true
	}
	
}

function checkcity(){
	var city=document.getElementById("city");
	var cityhint=document.getElementById("cityhint");
	if(city.value=="请选择"){
		cityhint.innerText="请选择城市";
		return false
	}else{
		cityhint.innerText="√";
		return true
	}
	
}



function check(){
	if(checkname()==true&checkphone()==true&checkcity()){
		return true;
	}else{
		alert("请按要求填写")
		return false;
	}
}